#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h>
void my_memcpy(void* dest, const void* src, int num)
{
	assert(dest && src);
	while (num--)
	{
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
}
int main()
{
	int arr1[] = { 1,2,3,4,5,6,7,8,9,10 };
	int arr2[20]={0};
	int len = sizeof(arr2) / sizeof(arr2[0]);
	my_memcpy(arr2, arr1, 5*sizeof(arr1[0]));
	for (int i = 0; i < len; i++)
	{
		printf("%d ", arr2[i]);
	}
	return 0;
}